<?php
//error_reporting(0);
$step = intval($_GET['step']);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Discuz7.2 -&gt; 6KBBS v8.0</title>
<style>
*{font-size:12px; font-family: "Verdana", "Arial", "Helvetica",  "sans-serif"; }
.login_body{background:#008EC3;margin:0px;padding:0px;}
.login_div{background:#F5F5F5; width:780px; margin:15px auto 10px auto; padding:15px 15px 30px 15px;}
.login_div a:link,.login_div a:active,.login_div a:visited,.login_div a:hover{color:#000; font-size:14px; text-decoration:none;}
.steptips{padding:10px;}
.status_succeed{color:green;}
.status_failed{color:red;}
.status_ing{color:blue;}

</style>
<script type="text/javascript" src="../../getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|ajax"></script></head>
<body class="login_body">
<div class="login_div">
<input type="button" value="第一步：转换论坛版块表" onclick="goStep(1)" id="btn1" /><div id="step1" class="steptips"></div>
<input type="button" value="第二步：转换用户数据表" onclick="goStep(2)" id="btn2" /><div id="step2" class="steptips"></div>
<input type="button" value="第三步：转换帖子数据表" onclick="goStep(3)" id="btn3" /><div id="step3" class="steptips"></div>
<input type="button" value="第四步：转换附件数据表" onclick="goStep(4)" id="btn4" /><div id="step4" class="steptips"></div>
</div>
<script>
var curN=0;
function goStep(n){
	curN=n;
	E("step"+curN).innerHTML = "<img src=\"loading.gif\" border=\"0\" align=\"absmiddle\" /> <span class=\"status_ing\">正在转换，请耐心等候...</span>";
	E("btn"+curN).disabled = true;
	ajaxGet("ajax.php?action=goStep"+curN,goStep_callback);
}
function goStep_callback(data){
	E("step"+curN).innerHTML="";
	E("btn"+curN).disabled = false;
	if(data=="y"){
		E("step"+curN).innerHTML="<b class='status_succeed'>√ 转换成功！</b>";
	}else{
		E("step"+curN).innerHTML="<b class='status_failed'>"+data+"</b>";
	}
}
</script>
</body>
</html>
